home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 3565-4.665 / dmg-4385 / issue_10 / 13.pne < prev    next >
Text File  |  1987-04-21  |  2KB  |  72 lines

  1.  
  2.  
  3. STOS 3D                      by Matthew Green.
  4.  
  5.  
  6. Well this month we will start writing a game using STOS 3D. This game will
  7. be a simple racing game which could be made into a very complex game if 
  8. you really tried.
  9.  
  10. The basic program is an example program you get on the Installation Disk 
  11. you get with STOS 3D which was called 'TDLOOP.BAS'.  To start with this 
  12. we need to modify this program in the following ways :
  13.  
  14. NOTE : Remember to have the td INIT command before any other command.
  15.  
  16. First you have to change line 50 to :
  17.  
  18. 50 td load "car2"
  19.  
  20. This loads the object into memory.
  21.  
  22. Then change line 60 to :
  23.  
  24. 60 td object "CAR2",-2000,0,0,0,16384,0
  25.  
  26. If you run the program now you won't see anything this is because car 
  27. number 2 is to your left.
  28.  
  29. There is no need to load car 1 yet because you are sitting in it and you 
  30. will not be able to see it.
  31. Car 2 will be the computers car or player 2's car.
  32.  
  33. But first off we need to move our car first.
  34. The easist way of moving our car is by the 'td forward' command which we 
  35. will use in this case.
  36.  
  37. Add :
  38.  
  39. 102 if s<0 then s=10: rem make sure speed stays above 0
  40. 103 if s>200 then s=200: rem creates top speed
  41. 106 if fire then s=s+10 : goto 110 : rem increases speed when fire
  42. 108 if s>0 then s=s-10 : rem slows down when fire is not pressed
  43. 110 if jleft then td angle rel 0,0,-430-s,0 : rem turns left
  44. 112 if jright then td angle rel 0,0,430-s,0 : rem turns right
  45. 114 td forward 0,s : rem object 0 moves s number of units
  46.  
  47. Now if you run the program you will still see nothing but if you turn left
  48. you will see the other car.  If you press fire you can then drive around.
  49.  
  50. What we need now is a speedo :
  51.  
  52. 155 locate 2,20:print "Speed : ";s;" "
  53.  
  54. Well that should get you started and if you can't cope with it I will put
  55. the program so far on next months disk so you better get STOSSER.
  56.  
  57. Next time we will try and add a few more objects for the course.
  58.  
  59. If you have any ideas for this game or any questions on 3D I will try
  60. and solve them for you.
  61.  
  62. One last thing I am writing a space game like 'Elite II' but not as good
  63. and a need a favor : 
  64.  
  65. I need space stations and space ships designed on the OM so I can put them
  66. in space. If you want somthing special on the station just write it down 
  67. and I will try and add it to it.
  68.  
  69. If any one can help me and would be very grateful.
  70.  
  71. Well until next time....
  72.